package gui;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JButton;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;
import java.awt.Color;

import javax.swing.UIManager;

import java.awt.SystemColor;
import javax.swing.SwingConstants;

public class AdminMenu extends JPanel {

	private JButton btnShowBalance;
	private JButton btnDeposit;
	private JButton btnWithdraw;
	private JButton btnTransfer;
	private JButton btnRemoveUser;
	private JButton btnShowAll;
	private JButton btnAddUser;
	private JButton btnExchangerate;
	private JButton btnRichAndPoor;
	private JButton btnLogOut;
	private JLabel piclabel;
	/**
	 * Create the frame.
	 */
	public AdminMenu() {
		setBackground(Color.WHITE);
		setLayout(null);
		
		JLabel lblAdminMenu = new JLabel("Admin menu");
		lblAdminMenu.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblAdminMenu.setBounds(181, 13, 87, 17);
		add(lblAdminMenu);

		btnShowBalance = new JButton("Show balance");
		btnShowBalance.setBounds(22, 64, 120, 25);
		add(btnShowBalance);

		btnDeposit = new JButton("Deposit");
		btnDeposit.setBounds(22, 101, 120, 25);
		add(btnDeposit);

		btnWithdraw = new JButton("Withdraw");
		btnWithdraw.setBounds(22, 139, 120, 25);
		add(btnWithdraw);

		btnTransfer = new JButton("Transfer");
		btnTransfer.setBounds(22, 177, 120, 25);
		add(btnTransfer);

		btnRemoveUser = new JButton("Remove User");
		btnRemoveUser.setBounds(165, 139, 120, 25);
		add(btnRemoveUser);

		btnShowAll = new JButton("Show all");
		btnShowAll.setBounds(165, 177, 120, 25);
		add(btnShowAll);

		btnAddUser = new JButton("Add User");
		btnAddUser.setBounds(165, 101, 120, 25);
		add(btnAddUser);

		btnExchangerate = new JButton("Exchange rate");
		btnExchangerate.setHorizontalAlignment(SwingConstants.LEFT);
		btnExchangerate.setBounds(165, 64, 120, 25);
		add(btnExchangerate);

		btnRichAndPoor = new JButton("Rich and poor");
		btnRichAndPoor.setBounds(22, 215, 120, 25);
		add(btnRichAndPoor);

		btnLogOut = new JButton("Log out");
		btnLogOut.setBounds(165, 215, 120, 25);
		add(btnLogOut);
		
		piclabel = new JLabel("");
		piclabel.setBounds(308, 64, 116, 105);
		add(piclabel);

		Image cbslogo = new ImageIcon(this.getClass().getResource("BCBS_logo.png")).getImage();
		piclabel.setIcon(new ImageIcon(cbslogo));
	}
	
	public void addActionListener(ActionListener l) {
		btnShowBalance.addActionListener(l);
		btnDeposit.addActionListener(l);
		btnWithdraw.addActionListener(l);
		btnTransfer.addActionListener(l);
		btnRemoveUser.addActionListener(l);
		btnShowAll.addActionListener(l);
		btnAddUser.addActionListener(l);
		btnExchangerate.addActionListener(l);
		btnRichAndPoor.addActionListener(l);
		btnLogOut.addActionListener(l);
	}
	
	public JButton getBtnShowBalance() {
		return btnShowBalance;
	}
	public JButton getBtnDeposit() {
		return btnDeposit;
	}
	public JButton getBtnWithdraw() {
		return btnWithdraw;
	}
	public JButton getBtnTransfer() {
		return btnTransfer;
	}
	public JButton getBtnRemoveUser() {
		return btnRemoveUser;
	}
	public JButton getBtnShowAll() {
		return btnShowAll;
	}
	public JButton getBtnAddUser() {
		return btnAddUser;
	}
	public JButton getBtnExchangerate() {
		return btnExchangerate;
	}
	public JButton getBtnRichAndPoor() {
		return btnRichAndPoor;
	}
	public JButton getBtnLogOut() {
		return btnLogOut;
	}

	
}